import ClassBase from "../robloxex/ClassBase";

/** 触发器基类 */
export default class TriggerBase extends ClassBase implements clazz.TriggerBase {
    /**
     * 触发器碰撞体
     */
    public toucher?: BasePart
    public onTouch(call: (c: BasePart) => void) {
        this.toucher?.Touched.Connect(c => {
            return call(c)
        })
    }
    constructor(config: Configuration) {
        super(config);
        this.setTag('TriggerBase')
    }
}